﻿<Controls:SinacorWindowHelp 
    x:Class="Sinacor.UI.HelpViewer.View.Viewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
    xmlns:WindowsFormsIntegration="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
    xmlns:CC="clr-namespace:Sinacor.UI.HelpViewer.View"
    Title="{DynamicResource Infra.Controls.Label.TituloPrincipalHelp}">

    <Controls:SinacorWindowHelp.Resources>

        <Style x:Key="EmptyButton" TargetType="{x:Type Button}">
            <Style.BasedOn>
                <Style TargetType="{x:Type ButtonBase}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ButtonBase}">
                                <ContentPresenter Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Style.BasedOn>
        </Style>

    </Controls:SinacorWindowHelp.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="20*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="80*" />
        </Grid.ColumnDefinitions>

        <Controls:SinacorGroupBox Style="{DynamicResource ControlGroupBoxExpander}" Grid.Column="0" Margin="5,5,0,5" Height="Auto" Width="Auto" Header="{DynamicResource Infra.Controls.Label.Topicos}">
            <CC:IndexPanel x:Name="indexPanel" Margin="0,5,0,0" SnapsToDevicePixels="True" SelectedItemChanged="OnIndexPanelSelectedItemChanged" />
        </Controls:SinacorGroupBox>
        
        <Controls:SinacorVerticalGridSplitter x:Name="IndexPanelSplitter" Grid.Column="1" Margin="3,20,3,20" />

        <Controls:SinacorGroupBox x:Name="grpMain" Style="{DynamicResource ControlGroupBoxExpander}" Grid.Column="2" Margin="0,5,5,5" Height="Auto" Width="Auto" Header="{DynamicResource Infra.Controls.Label.Ajuda}">
            <Controls:SinacorGroupBox.HeaderButtonsTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <ToggleButton x:Name="btnHome" Click="Viewer_Loaded" Style="{DynamicResource ControlToggleButtonHome}" ToolTip="{DynamicResource Infra.UI.Label.PaginaInicial}" />
                        <ToggleButton Name="GoBackButton" ToolTip="{DynamicResource Infra.UI.Label.Voltar}" Click="CurrentTabGoBack" IsEnabled="{Binding ElementName=TabbedViewer, Path=tabControl.SelectedItem.Content.CanGoBack, Mode=OneWay}" Style="{DynamicResource ControlToggleButtonBackward}" Margin="3,0,0,0" />
                        <ToggleButton Name="GoForwardButton" ToolTip="{DynamicResource Infra.UI.Label.Avancar}" Click="CurrentTabGoForward" IsEnabled="{Binding ElementName=TabbedViewer, Path=tabControl.SelectedItem.Content.CanGoForward, Mode=OneWay}" Style="{DynamicResource ControlToggleButtonForward}" Margin="3,0,0,0" />
                    </StackPanel>
                </DataTemplate>
            </Controls:SinacorGroupBox.HeaderButtonsTemplate>
            
            <Controls:SinacorTabControlBrowser x:Name="tabControl" SelectionChanged="OnTabControlSelectionChanged" AllowAddNew="True" AllowDelete="True" SelectNewTabOnCreate="True">
                <Controls:SinacorTabItemBrowser>
                    <Controls:SinacorTabItemBrowser.Header>
                        <TextBlock Text="Blank Page" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"/>
                    </Controls:SinacorTabItemBrowser.Header>
                    <WindowsFormsIntegration:WindowsFormsHost>
                        <CC:ExtendedWebBrowser x:Name="webBrowser"></CC:ExtendedWebBrowser>
                    </WindowsFormsIntegration:WindowsFormsHost>
                </Controls:SinacorTabItemBrowser>
            </Controls:SinacorTabControlBrowser>
            
        </Controls:SinacorGroupBox>
    </Grid>
</Controls:SinacorWindowHelp>
